package net.lunjin.service.impl;

import java.math.BigDecimal;
import java.util.List;

import net.lunjin.bean.Organizations;
import net.lunjin.bean.OrganizationsKey;
import net.lunjin.dao.OrganizationsDao;
import net.lunjin.service.OrganizationsService;

import org.springframework.beans.factory.annotation.Autowired;

import finaler.util.Page;
import finaler.util.PageList;

public class OrganizationsServiceImpl implements OrganizationsService {


	@Autowired
	private OrganizationsDao organizationsDao;

	@Override
	public PageList getOrgList(Page page) throws Exception {
		return organizationsDao.getOrgList(page);
	}

	@Override
	public PageList getRecommendOrgList(Page page) throws Exception {
		return organizationsDao.getRecommendOrgList(page);
	}

	@Override
	public PageList getHighscoreOrgList(Page page) throws Exception {
		return organizationsDao.getHighscoreOrgList( page);
	}

	@Override
	public PageList getLowscoreOrgList(Page page) throws Exception {
		return organizationsDao.getLowscoreOrgList( page);
	}

	@Override
	public Organizations findByKey(BigDecimal orgId) throws Exception {
		return organizationsDao.findByKey( new OrganizationsKey(orgId));
	}
	
	@Override
	public boolean update(Organizations org) throws Exception {
		return organizationsDao.update(org);
	}
	
	@Override
	public boolean insert(Organizations org) throws Exception {
		return organizationsDao.insert(org);
	}
	
	@Override
	public List<Organizations> getAuditList() throws Exception {
		return organizationsDao.getAuditList();
	}

	@Override
	public boolean delete(Organizations org) throws Exception {
		return organizationsDao.delete(org);
	}
	
	@Override
	public void autoUpdateHit() throws Exception {
		organizationsDao.autoUpdateHit();
	}

	@Override
	public int getExistNum(BigDecimal orgid, String Orgshortname) throws Exception {
		return organizationsDao.getExistNum(orgid, Orgshortname);
	}

	@Override
	public List<Organizations> getRandomComList(int limit) throws Exception {
		return organizationsDao.getRandomComList(limit);
	}

}
